{% extends 'layout.html' %} {%block main%}
<ol class="breadcrumb">
  <li><a href="/">首页</a></li>
  <li><span>内容修改</span></li>
</ol>
<h3>内容修改-{{content.title}}</h3>
<form method="post">
  <div class="form-group">
    <label for="title">分类：</label>
    <select name="category" id="category" class="form-control">
      {%for category in categories%}
      <option value="{{category.id}}">{{category.name}}</option>
      {%endfor%}
    </select>
  </div>
  <div class="form-group">
    <label for="title">标题：</label>
    <input
      type="text"
      value="{{content.title}}"
      class="form-control"
      id="title"
      placeholder="请输入内容标题"
      name="title"
    />
  </div>
  <div class="form-group">
    <label for="description">简介：</label>
    <input
      type="text"
      value="{{content.description}}"
      class="form-control"
      id="description"
      class="form-control"
      placeholder="请输入内容简介"
      name="description"
    />
    <!--<textarea name="description" id="description" class="form-control" rows="5" placeholder="请输入内容简介"></textarea>-->
  </div>
  <div class="form-group">
    <label for="editor">内容：</label>
    <!--<div class="editor-wrapper">-->
    <textarea
      name="content"
      id="editor"
      class="form-control"
      rows="10"
      placeholder="请输入内容"
    >
{{content.content}}</textarea
    >
    <!--</div>-->
    <!--<textarea name="content" id="content" class="form-control" rows="10" placeholder="请输入内容"></textarea>-->
  </div>
  <button type="submit" class="btn btn-default">提交</button>
</form>
<script type="text/javascript" src="/public/editor/zepto.js"></script>
<script src="/public/js/reMarked.js"></script>
<script type="text/javascript">
  var editor = new Editor()
  editor.render()
</script>
{%endblock%}
